<div class="main process-table-detail">
    <div class="main-header">
        <div class="pa-icon-div pull-left fs-14">
            <i class="iconfont icon-shouye fs-14 icon-vertical-top"></i>
            <span class="fs-vertical-middle">内业>责任落实>
                <span class="fs-theme-color">工程用表</span>
            </span>
        </div>
        <go-back></go-back>
    </div>
    <div class="main-content">
        <div class="right-div">
            <div class="right-div-header">
                <span class="title">表格预览</span>
                <div class="operate-div">
                  <div class="right-div-header-item" ng-click="vm.$transferRecordDialog(vm)">
                    <i class="iconfont icon-gongwenliuzhuan fs-14"></i>
                    <span class="fs-14">流转记录</span>
                  </div>
                  <div class="right-div-header-item"
                    style="margin-right: 10px;"
                    ng-show="vm.isShowBtn"
                    ng-click="vm.$mobileDocument(vm)">
                    <i class="iconfont icon-guidang fs-16"></i>
                    <span class="fs-14">资料归档</span>
                  </div>
                  <div class="right-div-header-item"
                    style="margin-right: 10px;"
                    ng-show="vm.isShowBtn"
                    ng-click="vm.$print()">
                    <i class="iconfont icon-ordinaryprint fs-14"></i>
                    <span class="fs-14">打印</span>
                  </div>
                </div>
            </div>
            <div class="line"></div>
            <div class="qr-print-container" style="padding: 10px 30px">
                <table-header ng-model="vm.data" table-name="监理审查意见表" ng-readonly="vm.view.isReadonly"></table-header>
                <div class="table-no"> 编号AD17</div>
                <table class="process-table" border="1">
                    <tbody>
                        <tr>
                            <td>项目名称</td>
                            <td colspan="2">
                                <input type="text" class="width-100" ng-model="vm.data.projName" ng-readonly="vm.view.isReadonly">
                            </td>
                        </tr>
                        <!--                         <tr>
                            <td>审查内容名称</td>
                            <td colspan="2">
                                <input type="text" class="width-100"
                                    ng-model="vm.data.auditContentName"
                                    ng-readonly="vm.view.isReadonly">
                            </td>
                        </tr> -->
                        <tr>
                            <td colspan="3">
                                <superior-advice
                                content="vm.data.superiorAdvice"
                                name="vm.data.viceEngineerName"
                                time="vm.data.viceEngineerSignTimeStr"
                                ng-readonly="vm.view.isReadonly"></superior-advice>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                <engineer-advice ng-model="vm.data.engineerConfirm"></engineer-advice>
                            </td>
                        </tr>
                    </tbody>
                </table>
                <style>
                  .qr-print-container .table-header .header-item {
                    padding: 5px 0;
                  }
                  .qr-print-container .table-header .text-center {
                    text-align: center;
                  }
                  .qr-print-container .table-header .item {
                    line-height: 30px;
                    display: inline-block;
                  }
                  .qr-print-container .table-header .title {
                    font-size: 18px;
                    font-weight: 800;
                  }
                  .qr-print-container .table-header .inline {
                    display: inline-block;
                    vertical-align: middle;
                  }
                  .qr-print-container .table-header .pull-right {
                    float: right;
                  }
                  .qr-print-container .table-header .header-item input {
                    border: none;
                    border-bottom: 1px solid #ddd;
                  }
                  .qr-print-container .table-header .m-w {
                    min-width: 224px;
                  }
                  .qr-print-container .superior-advice {
                    text-align: left;
                  }
                  .qr-print-container .superior-advice .title {
                    line-height: 30px;
                  }
                  .qr-print-container .superior-advice .content {
                    width: 100%;
                    min-height: 150px;
                    padding: 5px;
                    box-sizing: border-box;
                  }
                  .qr-print-container .superior-advice .content textarea {
                    width: 100%;
                    min-height: 150px;
                    padding: 5px;
                    color: #666;
                    box-sizing: border-box;
                    text-indent: 2em;
                    resize: none;
                  }
                  .qr-print-container .superior-advice .footer .pull-left {
                    float: left;
                  }

                  .qr-print-container .superior-advice .footer .footer-item {
                    display: inline-block;
                  }
                  .qr-print-container .superior-advice .footer .pull-right {
                    float: right;
                  }
                  .qr-print-container .superior-advice .footer .footer-item {
                    display: inline-block;
                  }
                  .qr-print-container .superior-advice .footer .item {
                    line-height: 30px;
                    display: inline-block;
                    vertical-align: middle;
                  }
                  .qr-print-container .superior-advice .footer .footer-item .show-time {
                    display: inline-block;
                    min-width: 50px;
                    text-align: center;
                  }
                  .qr-print-container .engineer-advice {
                    text-align: left;
                  }
                  .qr-print-container .engineer-advice .title {
                    line-height: 30px;
                  }
                  .qr-print-container .engineer-advice .content {
                    width: 100%;
                    min-height: 150px;
                    padding: 5px;
                    box-sizing: border-box;
                    text-indent: 2em;
                    text-align: justify;
                  }
                  .qr-print-container .engineer-advice .footer .pull-left {
                    float: left;
                  }
                  .qr-print-container .engineer-advice .footer .footer-item {
                    display: inline-block;
                  }
                  .qr-print-container .engineer-advice .footer .pull-right {
                    float: right;
                  }
                  .qr-print-container .engineer-advice .footer .footer-item {
                      display: inline-block;
                  }
                  .qr-print-container .engineer-advice .footer .item {
                    line-height: 30px;
                    display: inline-block;
                    vertical-align: middle;
                  }
                  .qr-print-container .engineer-advice .footer .footer-item .show-time {
                    display: inline-block;
                    min-width: 50px;
                    text-align: center;
                  }
                  .qr-print-container .table-no {
                    float: right;
                    line-height: 30px;
                  }
                  .qr-print-container .width-100 {
                    width: 100%;
                  }
                  .qr-print-container .process-table {
                    width: 100%;
                    border-collapse: collapse;
                    box-sizing: border-box;
                  }
                  .qr-print-container .process-table td {
                    line-height: 30px;
                    text-align: center;
                  }
                  .qr-print-container .process-table td input {
                    line-height: 30px;
                    border:none;
                  }
                  .qr-print-container .process-table td textarea {
                    border: none;
                  }
                </style>
            </div>
        </div>
        <div class="left-div">
            <div class="left-sub-header">
                <table-process ng-model="vm.processList"></table-process>
            </div>
        </div>
    </div>
</div>

<!-- 资料归档 -->
<script type="text/ng-template" id="dataArchiving">
  <div class="pa-dialog">
    <div class="pa-dialog-header">
      <div class="title-txt">
        <span>资料归档</span>
      </div>
    </div>
    <div class="pa-dialog-content text-center document-dialog-file">
      <div class="pa-form-control pa-width-100">
        <label class="text-right"><b>*</b>资料分类：</label>
        <select class="form-control-select"
          ng-options="box.id as box.name for box in vm.boxType"
          ng-model="vm.document.type">
          <option value="{{box.id}}">{{box.name}}</option>
        </select>
      </div>
      <div class="pa-form-control pa-width-100">
        <label class="text-right"><b>*</b>资料编号：</label>
        <input type="text" class="form-control-input"
          ng-model="vm.document.documentNumber">
      </div>
      <div class="pa-form-control pa-width-100">
        <label class="text-right"><b>*</b>资料名称：</label>
        <input type="text" class="form-control-input"
          ng-model="vm.document.documentName">
      </div>
      <div class="pa-form-control pa-width-100">
        <label class="text-right"><b>*</b>编制时间：</label>
        <input type="text" class="pa-form-control-input date-picker"
          data-ng-datepicker
          ng-model="vm.document.compileTime">
      </div>
      <div class="pa-form-control pa-width-100">
        <label class="text-right">备注：</label>
        <textarea type="text" class="form-control-textarea"
          ng-model="vm.document.remark"></textarea>
      </div>
      <div class="pa-form-control pa-width-100">
        <label class="text-right">附件：</label>
        <div class="pa-operate-add fs-14 fs-theme-color dialog-file-btn">
          <a class="pa-btn-a"
            attachment-uploader
            data-url="/api/v1/common/uploadFile?folderName=document"
            data-target=".file-list"
            ng-model="vm.view.attachmentFiles">
            <span>上传附件</span>
          </a>
        </div>
        <div class="file-list" style="min-height: 30px;">
          <div class="upload-result">
            <div class="result-item" ng-repeat="file in vm.view.attachmentFiles">
              <span class="file-name">{{file.name}}</span>
              <span>{{file.humanSize}}</span>
              <i class="fa fa-times-circle file-remove-btn" ng-click="$removeFile(file);"></i>
              <span ng-if="file.success === false">上传失败</span>
              <progress ng-if="file.isUploading" class="progress-bar" value="{{file.loaded}}" max="{{file.size}}"></progress>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="pa-dialog-footer text-center">
      <a class="pa-btn" ng-click="vm.submitForm()">
        <span>确定</span>
      </a>
      <a class="pa-btn reset-btn" ng-click="closeThisDialog()">
        <span>取消</span>
      </a>
    </div>
  </div>
</script>


<!-- 流转记录 -->
<script type="text/ng-template" id="transferRecord">
    <div class="pa-dialog">
      <div class="pa-dialog-header">
        <div class="title-txt">
          <span>流转记录</span>
        </div>
      </div>
      <div class="pa-dialog-content text-center device-detail-operate document-dialog-file">
        <div class="pa-table-container" style="padding-bottom: 54px;">
          <table class="pa-table">
            <thead>
              <tr>
                <th>时间</th>
                <th>操作人</th>
                <th>操作结果</th>
                <th>审批意见</th>
              </tr>
            </thead>
              <tbody>
                <tr ng-show="vm.$table.fetchTimes > 0 &amp;&amp; vm.$table.pagination.total == 0 &amp;&amp; !vm.$table.isTableLoading" class="ng-scope ng-hide" aria-hidden="true">
                  <td colspan="4">
                    <div>暂无数据</div>
                  </td>
                </tr>
                <tr ng-show="vm.$table.isTableLoading" class="ng-scope ng-hide" aria-hidden="true">
                  <td colspan="4">
                    <div>数据加载中...</div>
                  </td>
                </tr>
                <tr ng-repeat="item in vm.recordList">
                  <td>{{item.createnodeTime | date: 'yyyy-MM-dd'}}</td>
                  <td>{{item.confirmUserName}}</td>
                  <td>{{item.actionType == 'agree' ? '同意' :
                      item.actionType == 'disAgree' ? '不同意' : ''}}</td>
                  <td>{{item.confirmInfo}}</td>
                </tr>
              </tbody>
          </table>
          <div style="float: left;margin:22px 0;height:30px;display: inline-block;">共计<span style="color: #008bdd">{{vm.$table.pagination.totalItems}}</span>条</div>
          <ul uib-pagination
              total-items="vm.$table.pagination.totalItems"
              items-per-page="vm.$table.pagination.ITEMS_PER_PAGE"
              ng-model="vm.$table.pagination.currentPage"
              ng-change="vm.query()"
              max-size="vm.$table.pagination.maxSize"
              next-text="下一页"
              previous-text="上一页"
              class="pagination-sm pull-right"
              boundary-link-numbers="true"
              rotate="true"
              force-ellipses="true"></ul>
        </div>
      </div>
    </div>
</script>